package com.ycw.xiaoyezi.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.ycw.bean.Users;
import com.ycw.util.Msg;
import com.ycw.xiaoyezi.service.UsersService;

@Controller
public class testController {

	@Autowired
	UsersService usersService;

	@RequestMapping("/test")
	@ResponseBody
	public Msg test() {
		List<Users> lists = usersService.getAllUsers();

		PageInfo pageInfo = new PageInfo(lists);

		return Msg.success().add("pageInfo", pageInfo);
	}
}
